package com.atwisdom.star.core.dao.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.atwisdom.star.core.dao.pojo.Event;
import com.atwisdom.star.core.dao.service.EventService;
import com.atwisdom.star.core.dao.mapper.EventMapper;
import org.springframework.stereotype.Service;

/**
* @author fushb
* @description 针对表【event】的数据库操作Service实现
* @createDate 2023-03-30 14:27:39
*/
@Service
public class EventServiceImpl extends ServiceImpl<EventMapper, Event>
    implements EventService{

    @Override
    public Event getOneByCategoryAndName(String category, String name) {
        LambdaQueryWrapper<Event> wrapper = new LambdaQueryWrapper();
        wrapper.eq(Event::getCategory, category)
                .eq(Event::getName, name);
        return getOne(wrapper);
    }
}




